package com.microlecture.service.impl;

import com.microlecture.entity.CookbookFood;
import com.microlecture.mapper.CookbookFoodMapper;
import com.microlecture.service.CookbookFoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CookbookFoodServiceImpl implements CookbookFoodService {

    @Autowired
    private CookbookFoodMapper cookbookFoodMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return cookbookFoodMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insertSelective(CookbookFood record) {
        return cookbookFoodMapper.insertSelective(record);
    }

    @Override
    public CookbookFood selectByPrimaryKey(Integer id) {
        return cookbookFoodMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(CookbookFood record) {
        return cookbookFoodMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<CookbookFood> selectByCondition(Integer cookbookid) {
        return cookbookFoodMapper.selectByCondition(cookbookid);
    }
}